<!doctype html>
<title>document.write comment into iframe</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<iframe id="test"></iframe>
<script>
test(function() {
  var iframe = document.getElementById("test");
  var s = "<!--Filler-->";
  for (var i=0; i<s.length; i++) {
    iframe.contentDocument.write(s);
  }
  iframe.contentDocument.close();
  assert_equals(iframe.contentDocument.childNodes[0].nodeType, document.COMMENT_NODE);
  assert_equals(iframe.contentDocument.childNodes[0].data, "Filler");
});
</script>
<div id="log"></div>
